home *** CD-ROM | disk | FTP | other *** search
/ Draw 3 / Draw 3.iso / AOL90 / COMP02.000 / %MAINDIR% / CalendarResource.dll / HTML / ACWREGIONSEL.JS < prev    next >
Encoding:
Text File  |  2004-11-29  |  7.1 KB  |  304 lines

  1.  
  2. var Africa = new Array(
  3.             "Algeria|AGC", 
  4.             "Angola|AOC",
  5.             "Benin|BNC",
  6.             "Botswana|BCC",
  7.             "Burkina|UVC",
  8.             "Cameroon|CMC",
  9.             "Chad|CDC",
  10.             "Congo|CFC",
  11.             "Cote D'Ivoire|IVC",
  12.             "Djibouti|DJC",
  13.             "Egypt|EGC",
  14.             "Ethiopia|ETC",
  15.             "Gabon|GBC",
  16.             "Ghana|GHC",
  17.             "Guinea|GVC",
  18.             "Guinea-Bissau|PUC",
  19.             "Kenya|KEC",
  20.             "Liberia|LIC",
  21.             "Libya|LYC",
  22.             "Madagascar|MAC",
  23.             "Mali|MLC",
  24.             "Morocco|MOC",
  25.             "Mozambique|MZC",
  26.             "Namibia|WAC",
  27.             "Niger|NGC",
  28.             "Nigeria|NIC",
  29.             "Reunion|REC",
  30.             "Rwanda|RWC",
  31.             "Senegal|SGC",
  32.             "Sierra Leone|SLC",
  33.             "Somalia|SOC",
  34.             "South Africa|SFC",
  35.             "Sudan|SUC",
  36.             "Swaziland|WZC",
  37.             "The Gambia|GAC",
  38.             "Togo|TOC",
  39.             "Tunisia|TSC",
  40.             "Uganda|UGC",
  41.             "United Republic of Tanzania|TZC",
  42.             "Zaire|ZRC",
  43.             "Zambia|ZAC",
  44.             "Zimbabwe|ZIC"
  45.             );
  46. var Asia = new Array(
  47.             "Afghanistan|AFC",
  48.             "Bangladesh|BGC",
  49.             "China|CHC",
  50.             "India|INC",
  51.             "Japan|JAC",
  52.             "Kazakhstan|KZC",
  53.             "Kyrgyzstan|KGC",
  54.             "Macau|MCC",
  55.             "Mongolia|MGC",
  56.             "Nepal|NPC",
  57.             "North Korea|KNC",
  58.             "Pakistan|PKC",
  59.             "South Korea|KSC",
  60.             "Sri Lanka|CEC",
  61.             "Taiwan|TWC",
  62.             "Turskmenistan|TXC",
  63.             "Uzbekistan|UZC"
  64.             );
  65.             
  66. var SoutheastAsia = new Array(
  67.     "Burma|BMC",
  68.     "Cambodia|CBC",
  69.     "Indonesia|IDC",
  70.     "Laos|LAC",
  71.     "Malaysia|MYC",
  72.     "Philippines|RPC",
  73.     "Singapore|SNC",
  74.     "Thailand|THC",
  75.     "Vietnam|VMC"
  76.     );
  77. var AustraliaAndNewZealand = Array (
  78.     "Australia|ASC",
  79.     "New Zealand|NZC"
  80.     );
  81.  
  82. var Caribbean = new Array (
  83.     "Anguilla|AVC",
  84.     "Antigua and Barbuda|ACC",
  85.     "Aruba|AAC",
  86.     "Barbados|BBC",
  87.     "Cayman|CJC",
  88.     "Cuba|CUC",
  89.     "Dominican Republic|DRC",
  90.     "Grenada|GJC",
  91.     "Guadeloupe|GPC",
  92.     "Haiti|HAC",
  93.     "Jamaica|JMC",
  94.     "Martinique|MBC",
  95.     "Netherlands Antilles|NTC",
  96.     "Puerto Rico|RQC",
  97.     "Saint Lucia|STC",
  98.     "Trinidad and Tobago|TDC",
  99.     "Virgin Islands (U.S.)|VQC"
  100.     );
  101.   var CentralAmerica = new Array(
  102.     "Belize|BHC",
  103.     "Costa Rica|CSC",
  104.     "El Salvador|ESC",
  105.     "Guatemala|GTC",
  106.     "Honduras|HOC",
  107.     "Nicaragua|NUC",
  108.     "Panama|PMC");
  109.  
  110. var Europe = new Array (
  111.     "Albania|ALC",
  112.     "Austria|AUC",
  113.     "Belgium|BEC",
  114.     "Bosnia and Herzogovina|BKC",
  115.     "Bulgaria|BUC",
  116.     "Croatia|HRC",
  117.     "Cyprus|CYC",
  118.     "Czech Republic|EZC",
  119.     "Denmark|DAC",
  120.     "Finland|FIC",
  121.     "France|FRC",
  122.     "Germany|GMC",
  123.     "Greece|GRC",
  124.     "Hungary|HUC",
  125.     "Iceland|ICC",
  126.     "Ireland|EIC",
  127.     "Italy|ITC",
  128.     "Latvia|LGC",
  129.     "Liechtenstein|LSC",
  130.     "Luxembourg|LUC",
  131.     "Moldovia|MDC",
  132.     "Monaco|MNC",
  133.     "Montenegro|MWC",
  134.     "Netherlands|NLC",
  135.     "Norway|NOC",
  136.     "Poland|PLC",
  137.     "Portugal|POC",
  138.     "Romania|ROC",
  139.     "Russia|RSC",
  140.     "Serbia|SRC",
  141.     "Spain|SPC",
  142.     "Sweden|SWC",
  143.     "Switzerland|SZC",
  144.     "Ukraine|UPC",
  145.     "United Kingdom|UKC"
  146.     );
  147.  
  148.  
  149. var MiddleEast = new Array (
  150.     "Armenia|AMC",
  151.     "Azerbaijan|AJC",
  152.     "Bahrain|BAC",
  153.     "Georgia|GGC",
  154.     "Iran|IRC",
  155.     "Iraq|IZC",
  156.     "Israel|ISC",
  157.     "Jordan|JOC",
  158.     "Kuwait|KUC",
  159.     "Lebanon|LEC",
  160.     "Oman|MUC",
  161.     "Saudi Arabia|SAC",
  162.     "Syria|SYC",
  163.     "Turkey|TUC",
  164.     "United Arab Emirates|TCC",
  165.     "West Bank|WEC",
  166.     "Yemen|YMC"
  167.     );
  168.     
  169. var NorthAmerica = new Array (
  170.     "Bahamas|BFC",
  171.     "Bermuda|BDC",
  172.     "Greenland|GLC",
  173.     "Canada|CAC",
  174.     "Mexico|MXC");
  175.  
  176. var SouthAmerica = new Array (
  177.     "Argentina|ARC",
  178.     "Bolivia|BOC",
  179.     "Brazil|BRC",
  180.     "Chile|CLC",
  181.     "Colombia|COC",
  182.     "Ecuador|ECC",
  183.     "Paraguay|PYC",
  184.     "Peru|PEC",
  185.     "Uruguay|UYC",
  186.     "Venezuela|VEC"
  187.     );
  188. var PacificIslands= new Array (
  189. //    "Federated Islands Of Micronesia|FMC",
  190.     "Fiji|FJC",
  191.     "French Polynesia|FPC",
  192. //    "Guam|GQC",
  193. //    "Marshall Islands|RMC",
  194.     "Papua New Guinea|PPC",
  195.     "Solomon Islands|BPC",
  196.     "Wake Island|WQC"
  197.     );
  198. var NONE = new Array(" ");
  199. var RegionList = new Array (Africa, Asia, SoutheastAsia, AustraliaAndNewZealand, Caribbean, CentralAmerica,
  200.                             Europe, MiddleEast, NorthAmerica,SouthAmerica, PacificIslands);
  201. var RegionName = new Array ("Africa", "Asia", "SoutheastAsia", "AustraliaAndNewZealand", "Caribbean", "CentralAmerica",
  202.                             "Europe", "MiddleEast", "NorthAmerica","SouthAmerica", "PacificIslands");
  203.  
  204.  
  205. //--------------------------------------------------------------------------------------------
  206. //      FillInRegionFromCountry
  207. //--------------------------------------------------------------------------------------------
  208. function FillInRegionFromCountry(country)
  209. {  
  210.     if (country.length==0)
  211.     {
  212.         window.document.all("stWRegion").value="";
  213.         return;
  214.     }
  215.     var serchStr = "|"+ country;
  216.     for (i=0; i<RegionList.length; i++)
  217.         for (j=0; j<RegionList[i].length; j++)
  218.         {
  219.             if (RegionList[i][j].indexOf (serchStr) >= 0)
  220.                 {
  221.                     window.document.all("stWRegion").value = "st-" + RegionName[i];
  222.                     return;
  223.                 }
  224.          }
  225. }   
  226.  
  227. //--------------------------------------------------------------------------------------------
  228. //      WRegionOnChange
  229. //--------------------------------------------------------------------------------------------
  230. function WRegionOnChange()
  231. {
  232.     var selRegion = stWRegion.value;
  233.     switch (selRegion) {
  234.     case "st-Africa":
  235.         UpdateCountrylist (Africa);
  236.         break;
  237.     case "st-Asia":
  238.         UpdateCountrylist (Asia);
  239.         break;
  240.     case "st-SoutheastAsia":
  241.         UpdateCountrylist (SoutheastAsia);
  242.         break;
  243.     case "st-AustraliaAndNewZealand":
  244.         UpdateCountrylist (AustraliaAndNewZealand);
  245.         break;
  246.     case "st-Caribbean":
  247.         UpdateCountrylist (Caribbean);
  248.         break;
  249.     case "st-CentralAmerica":
  250.         UpdateCountrylist (CentralAmerica);
  251.         break;
  252.     case "st-Europe":
  253.         UpdateCountrylist (Europe);
  254.         break;
  255.     case "st-MiddleEast":
  256.         UpdateCountrylist (MiddleEast);
  257.         break;
  258.     case "st-NorthAmerica":
  259.         UpdateCountrylist (NorthAmerica);
  260.         break;
  261.     case "st-SouthAmerica":
  262.         UpdateCountrylist (SouthAmerica);
  263.         break;
  264.     case "st-PacificIslands":
  265.         UpdateCountrylist (PacificIslands);
  266.         break;
  267.     case "":
  268.     case " ":
  269.         UpdateCountrylist (NONE);
  270.     }
  271.  
  272.     WCountrySetCityList ();
  273. }
  274.  
  275. //--------------------------------------------------------------------------------------------
  276. //      UpdateCitylist
  277. //--------------------------------------------------------------------------------------------
  278. function UpdateCountrylist(countryArray)
  279. {
  280.     var numOpt = window.document.all.stWCountry.options.length;
  281.     for (i=numOpt-1; i>=0; i--)
  282.         window.document.all.stWCountry.options.remove(i);    
  283.     for (var i=0; i<countryArray.length; i++)
  284.     {
  285.         var index = countryArray[i].indexOf ("|");
  286.         var strDisplay = countryArray[i].substr (0, index);
  287.         var strValue = countryArray[i].substr (index+1, countryArray[i].length);
  288.         var oOption = document.createElement("OPTION");
  289.         if (0 == i)
  290.             oOption.selected = true;
  291.         oOption.text=strDisplay;
  292.         oOption.value=strValue;
  293.         oOption.id = strValue;
  294.         window.document.all.stWCountry.add(oOption);
  295.     }        
  296.     return;
  297. }
  298.  
  299. function WRegionSetCountryList()
  300. {
  301.     WRegionOnChange ();
  302. }
  303.  
  304.